﻿using FPC.Offer.Common;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FPC.Offer.UI.GeneralProcessor.SkyDriveHand
{
    /// <summary>
    /// ShareLodnHandler 的摘要说明
    /// </summary>
    public class ShareLodnHandler : IHttpHandler
    {
        FPC.Offer.Service.System_ShareTableSerevice Sky = new Service.System_ShareTableSerevice();
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            var ids = Convert.ToInt32(context.Request["ids"]);
            var pwd = context.Request["pwd"];
            var Actioon = context.Request["Actioon"].ToString();
            if (pwd == "")
            {
                return;
            }
            else
            {
                if (Actioon == EnumAction.Select.ToString())
                {
                    List<Model.Dropbox_ShareFileTable> a = Sky.Find(w => w.ShaId == ids && w.SharePwd == pwd).ToList();
                    context.Response.Write(JsonConvert.SerializeObject(a.ToList()));
                }




            }

        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}